﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmallTune.Interfaces
{
    /// <summary>
    /// Arguments for the song position
    /// </summary>
    public class SongPositionEventArgs : EventArgs
    {
        /// <summary>
        /// Position in milliseconds
        /// </summary>
        public int position { get; set; }

        /// <summary>
        /// Total runtime of the track in milliseconds
        /// </summary>
        public int runtime { get; set; }
    }

    /// <summary>
    /// Features the Player. Don't know, if FMOD will ever be replaced,
    /// but if, there won't be a need to rewrite everything.
    /// </summary>
    public interface IPlayer
    {
        #region Events
        /// <summary>
        /// Song got started
        /// </summary>
        event EventHandler SongStarted;

        /// <summary>
        /// Song position changed
        /// </summary>
        event EventHandler<SongPositionEventArgs> SongPositionChanged;

        /// <summary>
        /// Song got stopped
        /// </summary>
        event EventHandler SongStopped;

        /// <summary>
        /// Song got paused
        /// </summary>
        event EventHandler SongPaused;
        #endregion

        #region Methods
        /// <summary>
        /// Pauses the current file
        /// </summary>
        void PauseFile();

        /// <summary>
        /// Stops the current file
        /// </summary>
        void StopFile();

        /// <summary>
        /// Plays a single file, and ends afterwards
        /// </summary>
        /// <param name="SongPath">Filepath</param>
        void PlayFile(string SongPath);
        #endregion

    }
}
